package com.it.day3;

/**
 * ClassName: LockByteCodeDemo
 * Description: synchronized底层字节码
 *
 * @Author: csx
 * @Create: 2025/5/9 - 9:06
 * @version: v1.0
 */
public class LockByteCodeDemo {
    Object object = new Object();

    public void m1(){
        synchronized(object){
            System.out.println("------m1");
            throw new RuntimeException("----RuntimeException");
        }
    }

    public static synchronized void m2(){
        System.out.println("------m1");
    }
}




























